package iO;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

//文件复制
public class CopyDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("./aa.PNG");
        FileOutputStream fos = new FileOutputStream("./1aa.PNG");
        int b;
        while ((b = fis.read()) != -1){//一直读取，只要不等于-1.就没有读取完成，就一直循环
            fos.write(b);
        }
        System.out.println("复制完成");
        fos.close();
    }
}
